// SCENARIO SCRIPT

// This is the special script for your entire scenario. It contains
// special encounters and code accessable from anywhere in the scenario. it also
// contains the code that initializes important special things in the
// scenario (like shops and names and descriptions of special items).

// You can create your own states, but you should give all of them numbers greater than
// or equal to 10.

beginscenarioscript;

variables;

body;

// This is the state that is called every time the scenario is loaded,
// even when a save file in the scenario is loaded. Some things that should go here:
//    Names and descriptions of special items.
//    Names and effects of custom special abilities.
beginstate LOAD_SCEN_STATE;
	set_creature_type_level(34,24);
	set_creature_type_level(35,28);
	set_creature_type_level(36,20);
	set_creature_type_level(37,22);
	set_creature_type_level(42,23);
	set_creature_type_level(43,24);
	set_creature_type_level(44,25);
	set_creature_type_level(46,10);
	set_creature_type_level(47,25);
	set_creature_type_level(136,25);
	set_creature_type_level(137,25);
	set_creature_type_level(138,30);
	set_creature_type_level(191,20);
	set_creature_type_level(192,23);

	init_quest(0,"Find the Goblins' Lair","The commander of Fort Laramie has had some trouble with goblins lately. He hopes that you can find their lair and put and end to them.");
	init_quest(1,"Help the Sculptress","Kate, the sculptress in Grimson is looking for something exotic to use as a model in her statue.");
	init_quest(2,"Find the Beast","The hunter in Grimson wants you to locate the lair of a mysterious canine and then to report back to him.");
	init_quest(3,"Cure Sigmund","You promised to get Sigmund some herbal tea, so why not try to cure him completely.");
	init_quest(4,"Deliver Letter","Captain Yarling of Grimson wants you to deliver a letter to the commanders in Sattle, Norton and Fort Laramie.");
	init_quest(5,"Defeat the Slithzerikai","Sattle is being invaded by a slithzerikai tribe. Your job is to attack them in their lair, west of Sattle.");
	init_quest(6,"The Missing Messenger","The messenger of Sattle is missing. He was supposed to take a message to Norton a week ago.");
	init_quest(7,"The Necklace of Luna","A woman in Sattle fears her husband is dead. She wants you to go to the Iron Mines and find the necklace her husband was carrying, to bring her closure.");
	init_quest(8,"End the Undead Threat","Grimson is under attack by undead armies. Your job is to find a way to stop them.");
	init_quest(9,"Help Mosadorl","The vampire Mosadorl claims innocence on the attacks on Grimson. To prove this, he has promised to help you, if you help him by convincing the mayor of Grimson that Mosadorl is not to blame.");
	init_quest(10,"Secure Iron Shipment","Your ultimate task in Faerengrove is to find out why the iron shipments have stopped, and ensure that they will be sent to the Empire lands.");

	init_special_item(0,"Demon Amulet","The amulet you found in the goblins lair, tinkered by Mosadorl, in order to smite the demon lord when brought close enough to him.");
	init_special_item(1,"Letter","This letter was given to you by Captain Yarling. She wants you to deliver it to the commanders in Sattle, Norton and Fort Laramie.");
	init_special_item(2,"Goblin Amulet","You found this amulet on the body of the goblin chieftain. Goblins aren't known for their jewelry skills, so it can't be made by goblins. It has a skull, most likely a human, with claw marks across the forehead.");
	init_special_item(3,"Iron Key","A key made of iron, you found in the Iron Mines.");
	init_special_item(4,"Necklace","You took this necklace off a dead miner. It has a falcon flying towards the moon and an inscription on the back: _From Luna with all love._");
	init_special_item(5,"Deputation","You have been given a piece of paper that authorizes you as a special agent of the Empire.");
	init_special_item(6,"Bat Head","This head belonged to the screaming white bat you killed. While it is of no use to you, you hope someone will want it.");
	init_special_item(7,"Tiny Brass Key","Given to you by Havelock the alchemist, this key opens the door in his hut.");
	init_special_item(8,"Hendrickson's Key","Found around the neck of the dead hunter Hendrickson. This key most likely fits something in Hendrickson's house.");
	init_special_item(9,"Ancient Tome","This tome was found in the vampire's lair. Within the tome lie several ancient holy rituals. Some of them are specifically designed to smite demons. How to invoke the rituals is beyond you.");
	init_special_item(10,"Demon Amulet","The amulet you found in the goblins lair, tinkered by Bearworth, in order to smite the demon lord when brought close enough to him.");

	break;

// This is the state that is called only once at the very beginning of 
// the scenario. Some things that should go here:
//    The stuff in shops.
//    Creating horses and boats.
beginstate START_SCEN_STATE;
	// Initialize a few shops.

	toggle_quest(10,1);
	
	// Shop 0 - Benedict
	add_item_to_shop(0,220,25);
	add_item_to_shop(0,222,25);
	add_item_to_shop(0,223,25);
	add_item_to_shop(0,227,20);
	add_item_to_shop(0,228,15);
	
	
	// Shop 1 - Inn
	add_item_to_shop(1,4,25);
	add_item_to_shop(1,11,3);
	add_item_to_shop(1,8,5);
	
	
	// Shop 2 - Skyle
	add_item_to_shop(2,5025,5);

	
	// Shop 3 - Theodore missiles
	add_item_to_shop(3,90,15);
	add_item_to_shop(3,91,2);
	add_item_to_shop(3,96,2);
	add_item_to_shop(3,95,3);
	add_item_to_shop(3,101,50);
	add_item_to_shop(3,102,10);
	add_item_to_shop(3,106,50);

	// Shop 4 - Weapons by Leo
	add_item_to_shop(4,51,10);
	add_item_to_shop(4,56,10);
	add_item_to_shop(4,61,10);
	add_item_to_shop(4,66,10);
	add_item_to_shop(4,71,10);
	add_item_to_shop(4,46,10);
	add_item_to_shop(4,76,10);

	// Shop 5 - Ursa's food
	add_item_to_shop(5,4,500);
	add_item_to_shop(5,6,500);
	add_item_to_shop(5,447,10);

	// Shop 6 - Armor & Sarah
	add_item_to_shop(6,31,10);
	add_item_to_shop(6,36,10);
	add_item_to_shop(6,41,10);
	add_item_to_shop(6,127,10);
	add_item_to_shop(6,132,10);
	add_item_to_shop(6,142,10);
	add_item_to_shop(6,324,10);

	// Shop 7 - Vagabond's Rest
	add_item_to_shop(7,4,20);
	add_item_to_shop(7,6,20);
	add_item_to_shop(7,7,10);

	// Shop 8 - Adventuring Gear
	add_item_to_shop(8,17,1);
	add_item_to_shop(8,46,5);
	add_item_to_shop(8,171,10);
	add_item_to_shop(8,178,5);
	add_item_to_shop(8,220,2);
	add_item_to_shop(8,221,3);

	// Shop 9 - Havelock's Emporium
	add_item_to_shop(9,451,1);
	add_item_to_shop(9,422,1);
	add_item_to_shop(9,308,1);
	add_item_to_shop(9,241,1);
	add_item_to_shop(9,234,2);

	// Shop 10 - Farmer John's
	add_item_to_shop(10,4,10);
	add_item_to_shop(10,6,10);

	create_boat(1,1,18,57,1);
	create_boat(2,1,17,52,1);
	create_boat(3,1,20,52,1);
	create_boat(4,1,19,57,1);

 
break;

// This state is called every tick wherever the party is in the scenario.
// You can use the set_state
beginstate START_STATE;

break;

// Place your own states below. Give each a number at least 10.

beginstate 10;
	large_draw_pic_dialog(552,"A rough map of Faerengrove, clearly not an Empire authorized one.");
break;

beginstate 11;
	message_dialog("UNDEAD AND YOU - By I.M Morean - Undead can be perilous foes. When dealing with undead it is essential that you know exactly how to behave.","Firstly you must know how to recognize undead. Up close, it can be easy, for the undead are known for their foul stench and decomposed features...");

break;

beginstate 12;
	play_sound(24);

	if (char_ok(0) == TRUE)
		change_pc_skill_pts(1,3);
	if (char_ok(1) == TRUE)
		change_pc_skill_pts(2,3);
	if (char_ok(2) == TRUE)
		change_pc_skill_pts(3,3);
	if (char_ok(3) == TRUE)
		change_pc_skill_pts(4,3);
break;
